package request

import (
	"gitee.com/cjsn/topsdk/ability254/domain"
	"gitee.com/cjsn/topsdk/util"
)

type TmallMallitemcenterSupplierPriceUploadRequest struct {
	/*
	   服务code     */
	ServiceCode *string `json:"service_code,omitempty" required:"false" `
	/*
	   服务商门店价格列表     */
	ProviderPriceList *[]domain.TmallMallitemcenterSupplierPriceUploadStoreOfferPriceDto `json:"provider_price_list" required:"true" `
}

func (s *TmallMallitemcenterSupplierPriceUploadRequest) SetServiceCode(v string) *TmallMallitemcenterSupplierPriceUploadRequest {
	s.ServiceCode = &v
	return s
}
func (s *TmallMallitemcenterSupplierPriceUploadRequest) SetProviderPriceList(v []domain.TmallMallitemcenterSupplierPriceUploadStoreOfferPriceDto) *TmallMallitemcenterSupplierPriceUploadRequest {
	s.ProviderPriceList = &v
	return s
}

func (req *TmallMallitemcenterSupplierPriceUploadRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.ServiceCode != nil {
		paramMap["service_code"] = *req.ServiceCode
	}
	if req.ProviderPriceList != nil {
		paramMap["provider_price_list"] = util.ConvertStructList(*req.ProviderPriceList)
	}
	return paramMap
}

func (req *TmallMallitemcenterSupplierPriceUploadRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
